package com.example.library_room

import androidx.room.Database
import androidx.room.RoomDatabase
import androidx.room.TypeConverters
import com.example.library_room.converter.DateConverter
import com.example.library_room.dao.UserDao
import com.example.library_room.db.UserDB

/**
 * 如果去掉exportSchema = false，则需要在build.gradle中加上room的输出目录
 * javaCompileOptions {
 * annotationProcessorOptions {
 * arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
 * }
 * }
 */
@Database(entities = [UserDB::class], version = 1, exportSchema = false)
@TypeConverters(DateConverter::class)
abstract class AppDatabase: RoomDatabase(){

    abstract fun getUserDao(): UserDao
}